/*
 * @Description:
 * @Date: 2023-11-25 11:39:18
 * @LastEditTime: 2023-11-25 11:47:50
 */
import { defineStore } from 'pinia';
import { getHomeData } from '../pages/home/service';
const useInitHome = defineStore('home', {
    state: () => ({
        homeData: []
    }),
    // 异步逻辑的地方
    actions: {
        // 登录请求
        async getHomeData(data: any) {
            getHomeData(data).then(res => {
                this.homeData = res;
            });
        }
    }
});

export default useInitHome;
